#/***************************************************************************
#    PluginBuilder
#
#    Creates a QGIS plugin template for use as a starting point in plugin
#    development.
#                             -------------------
#        begin                : 2011-01-20
#        copyright            : (C) 2011 by GeoApt LLC
#        email                : gsherman@geoapt.com
# ***************************************************************************/
#
#/***************************************************************************
# *                                                                         *
# *   This program is free software; you can redistribute it and/or modify  *
# *   it under the terms of the GNU General Public License as published by  *
# *   the Free Software Foundation; either version 2 of the License, or     *
# *   (at your option) any later version.                                   *
# *                                                                         *
# ***************************************************************************/
# Makefile for a PyQGIS plugin 
#
PLUGINNAME=featureAttachments

PY_FILES=dlgAttachmentsImpl.py dlgAttachments.py featureobject.py \
__init__.py metadataobject.py metadataObjectsModel.py postmeta.py qgisFeaturesEditorUtil.py

ICONS=icons

METADATA=metadata.txt

DIST_DIR=dist
#EXTRAS = help.html icon.png plugin_builder.png metadata.txt

RESOURCE_FILES = resources.py

default: compile

compile: $(RESOURCE_FILES)

%.py : %.qrc
	pyrcc4 -o $@  $<

%.py : %.ui
	pyuic4 -o $@ $<

# Create a zip package. Requires passing a valid commit or tag as follows:
#   make package VERSION=Version_0.3.2
package: compile
		rm -fr $(DIST_DIR)
		mkdir -p $(DIST_DIR)/$(PLUGINNAME)
		cp -vf $(PY_FILES) $(DIST_DIR)/$(PLUGINNAME)
		cp -vf $(RESOURCE_FILES) $(DIST_DIR)/$(PLUGINNAME)
		cp -vfr $(ICONS) $(DIST_DIR)/$(PLUGINNAME)
		cp -vf $(METADATA) $(DIST_DIR)/$(PLUGINNAME)
		cd $(DIST_DIR); zip -r $(PLUGINNAME).zip $(PLUGINNAME)

clean:
	rm $(UI_FILES) $(RESOURCE_FILES) *.pyc
